package JavaThread;


import ProcessThread.Constants;
import ProcessThread.util.FileReader;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

@Slf4j(topic = "c.StartRun")
public class StartRun {

    @Test
    public void test1() {
        Thread t1 = new Thread("t1") {
            @Override
            public void run() {
                log.debug("running...");
                FileReader.read(Constants.IMAGE_FULL_PATH);
            }
        };
        t1.run();
        log.debug("do other things...");
    }


    @Test
    public void test2() {
        Thread t1 = new Thread("t1") {
            @Override
            public void run() {
                log.debug("running...");
                FileReader.read(Constants.IMAGE_FULL_PATH);
            }
        };
        t1.start();
        log.debug("do other things...");
    }

    @Test
    public void test3() {
        Thread t1 = new Thread("t1") {
            @Override
            public void run() {
                log.debug("running...");
            }
        };
        System.out.println(t1.getState());
        t1.start();
        System.out.println(t1.getState());
    }


}